package com.example.newbee.mvp.model;

import com.example.mylibrary.http.RetrofitManager;
import com.example.mylibrary.mvp.model.BaseModel;
import com.example.newbee.api.APi;
import com.example.newbee.bean.TagBean;
import com.example.newbee.mvp.contact.TravelContract;

import java.util.List;

import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

public class TravelModel extends BaseModel implements TravelContract.Model {

   //请求标签
    @Override
    public void requestTag(Observer<List<TagBean>> observer) {
        RetrofitManager
                .getInstance()
                .getRetrofit()
                .create(APi.class)
                .tags()
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(observer);



    }
}
